package com.syh.jn.scm.service.api.downstream.system;

import cn.redscarf.commons.wrapper.Wrapper;
import com.syh.jn.scm.dto.downstream.system.DownMenuVo;
import com.syh.jn.scm.dto.downstream.system.downRole.DownRoleMto;
import com.syh.jn.scm.dto.downstream.system.downRole.DownRoleSto;
import com.syh.jn.scm.dto.downstream.system.downRole.DownRoleVo;
import com.syh.jn.scm.dto.operation.system.permission.PermissionVo;
import com.syh.jn.scm.service.core.BaseService;

import java.util.List;

public interface DownRoleService extends BaseService<DownRoleSto, DownRoleMto, DownRoleVo, Long> {


  /**
   * 更新角色菜单
   *
   * @param roleId
   * @param perIds
   */
  public void updateRoleMenus(Long roleId, List<Long> perIds);

  /**
   * 获取角色菜单
   *
   * @param wrapper
   */
  public List<DownMenuVo> getMenus(Wrapper wrapper);

  /**
   * 获取所有角色与权限
   *
   * @return
   */
  public List<DownRoleVo> getAllRolesWithPermission();

  /**
   * 获取角色所有的权限
   *
   * @param perId
   * @return
   */
  public List<DownRoleVo> getRolesByPermissionId(Long perId);

  /**
   * 根据帐号获取角色
   *
   * @param
   * @return
   */
  public DownRoleVo getRole(Long accountId);

  /**
   * 根据角色id查找对应权限
   *
   * @param roleId
   * @return
   */
  public List<PermissionVo> getPermissionByRoleId(Long roleId);
}
